package com.muli.muwai.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muli.muwai.entity.IntfCompanyOrder;
import com.muli.muwai.mapper.CompanyOrderMapper;
import com.muli.muwai.service.CompanyOrderService;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CompanyOrderServiceImpl extends ServiceImpl<CompanyOrderMapper, IntfCompanyOrder> implements CompanyOrderService {
    @Override
    public void saveCompanyOrder(List<IntfCompanyOrder> companyorder) {
        saveBatch(companyorder);
    }

    @Override
    public void deleteData() {

        //删除9月1号之后的数据
        String s = "2020-09-01";
        QueryWrapper<IntfCompanyOrder> queryWrapper = new QueryWrapper();
        queryWrapper.gt("create_time", s);
        int i = baseMapper.delete(queryWrapper);
        System.out.println(i);
    }
}
